<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   
    
    <title>My JSP 'json.jsp' starting page</title>
    <script type="text/javascript"  src="script/json.js"></script>
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  </head>

  <body>
    <input  type="button"  value="dian"  id="mybtn"/>
    <script  type="text/javascript">
     $(document).ready(function(){
    
     	$("#mybtn").click(function(){
     	
     
     		$.get("json.jspx",{name:"tom",age:22},function(date){
     			$(date).each(function(){
     			var n = this.name;
     				alert(n.length);
     			});
     		});
     	});
     });
     </script>
  </body>
</html>
